home *** CD-ROM | disk | FTP | other *** search
/ NeXT Education Software Sampler 1992 Fall / NeXT Education Software Sampler 1992 Fall.iso / Mathematics / Notebooks / URichMultivariateCalculus / 08 / Lab8.ma next >
Encoding:
Text File  |  1992-08-19  |  15.1 KB  |  241 lines

  1. (*^
  2.  
  3. ::[paletteColors = 128; currentKernel; 
  4.     fontset = title, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, bold, L1, e8,  24, "Times"; ;
  5.     fontset = subtitle, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, bold, L1, e6,  18, "Times"; ;
  6.     fontset = subsubtitle, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, italic, L1, e6,  14, "Times"; ;
  7.     fontset = section, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, grayBox, M22, bold, L1, a20,  18, "Times"; ;
  8.     fontset = subsection, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, blackBox, M19, bold, L1, a15,  14, "Times"; ;
  9.     fontset = subsubsection, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, whiteBox, M18, bold, L1, a12,  12, "Times"; ;
  10.     fontset = text, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  12;
  11.     fontset = smalltext, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  10, "Times"; ;
  12.     fontset = input, noPageBreakBelow, nowordwrap, preserveAspect, groupLikeInput, M42, N23, bold, L1,  12, "Courier"; ;
  13.     fontset = output, output, inactive, noPageBreakBelow, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L-5,  12, "Courier"; ;
  14.     fontset = message, inactive, noPageBreakBelow, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L1,  12, "Courier"; ;
  15.     fontset = print, inactive, noPageBreakBelow, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L1,  12, "Courier"; ;
  16.     fontset = info, inactive, noPageBreakBelow, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L1,  12, "Courier"; ;
  17.     fontset = postscript, PostScript, formatAsPostScript, output, inactive, noPageBreakBelow, nowordwrap, preserveAspect, groupLikeGraphics, M7, l34, w282, h287, L1,  12, "Courier"; ;
  18.     fontset = name, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, italic, L1,  10, "Times"; ;
  19.     fontset = header, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  12;
  20.     fontset = Left Header, nohscroll, cellOutline,  12;
  21.     fontset = footer, inactive, nohscroll, noKeepOnOnePage, preserveAspect, center, M7, L1,  12;
  22.     fontset = Left Footer, cellOutline, blackBox,  12;
  23.     fontset = help, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  10, "Times"; ;
  24.     fontset = clipboard, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  12;
  25.     fontset = completions, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  12, "Courier"; ;
  26.     fontset = special1, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  12;
  27.     fontset = special2, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  12;
  28.     fontset = special3, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  12;
  29.     fontset = special4, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  12;
  30.     fontset = special5, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  12;
  31.     next21StandardFontEncoding; ]
  32. :[font = title; inactive; Cclosed; preserveAspect; startGroup; ]
  33. Lab 8: Vector Functions in Space
  34. :[font = text; inactive; preserveAspect; ]
  35. This lab continues the study of parametrized curves that we began in Lab 2 and continued in Lab 6.  Here, we analyze curves in three dimensions.
  36. :[font = section; inactive; Cclosed; preserveAspect; startGroup; ]
  37. Graphs
  38. :[font = text; inactive; Cclosed; preserveAspect; startGroup; ]
  39. First we define two special function for graphing three-dimensional parametrized curves:
  40. :[font = input; preserveAspect; ]
  41. c[f_][a_,b_] := Graphics3D[Line[Table[N[f[t]],{t,a,b,0.01}]]];
  42. r[f_][a_,b_] := Do[ Show[ c[f][a,b], 
  43.                     ViewPoint -> {7Cos[s],7Sin[s],2} ], 
  44.                     {s,0,Pi/2,Pi/28} ];
  45. :[font = text; inactive; preserveAspect; endGroup; ]
  46. If f is defined to be a three-dimensional vector-valued function, then c[f][a,b] will produce the graph of f over the range [a,b], and r[f][a,b] will produce a sequence of 15 such graphs, each rotated by a different angle.
  47. ;[s]
  48. 13:0,0;3,1;4,2;70,3;81,4;107,5;108,6;125,7;126,8;127,9;128,10;134,11;145,12;223,-1;
  49. 13:1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,1,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,1,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  50. :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ]
  51. Examples
  52. :[font = text; inactive; Cclosed; preserveAspect; startGroup; ]
  53. Here is  a simplified version of the helix shown in Example 4 on page 761:
  54. :[font = input; preserveAspect; endGroup; ]
  55. f[t_] := { 3Cos[t], 3Sin[t], t };
  56. Show[ c[f][0,6Pi] ];
  57. :[font = text; inactive; Cclosed; preserveAspect; startGroup; ]
  58. Our second example is a closed space curve:
  59. :[font = input; preserveAspect; endGroup; ]
  60. f[t_] := { Cos[t]^3, Sin[t]^3, Sin[3t] };
  61. Show[ c[f][0,2Pi] ];
  62. :[font = text; inactive; preserveAspect; ]
  63. The problem with two-dimensional pictures of three-dimensional curves is that it is difficult to see the perspective.  In this second example, it is not clear whether the cusp pointing up is in front or behind the cusp pointing down.  Mathematica alleviates that problem by allowing us to animate the picture.
  64. ;[s]
  65. 3:0,0;235,1;246,2;309,-1;
  66. 3:1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  67. :[font = text; inactive; Cclosed; preserveAspect; startGroup; ]
  68. The r[f][0,2Pi] command produces a sequence of 15 graphs.  After they have all been generated (it may take a minute), select the cell that contains them all (click on its bracket), and then give the command Graph>Animate Selected Graphics (Command-y) to animate them:
  69. ;[s]
  70. 7:0,0;3,1;16,2;207,3;238,4;240,5;249,6;267,-1;
  71. 7:1,11,8,Times,0,12,0,0,0;1,10,8,Courier,1,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,9,Helvetica,1,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,9,Helvetica,1,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  72. :[font = input; preserveAspect; ]
  73. r[f][0,2Pi];
  74. :[font = text; inactive; preserveAspect; endGroup; endGroup; ]
  75. To slow down the animation, mouse down on the double down arrow button (the second from the right) in the little panel at the bottom right corner of this Mathematica window.  To change the animation so that it runs forward and then backward through the sequence (instead of cycling back to the first after the last), click on the circular arrow button (fifth from the right).  To stop the animation, click anywhere in the window.
  76. ;[s]
  77. 3:0,0;154,1;166,2;429,-1;
  78. 3:1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  79. :[font = subsection; inactive; Cclosed; pageBreak; preserveAspect; startGroup; ]
  80. Exercises
  81. :[font = text; inactive; preserveAspect; ]
  82. Examine the following curves.  First execute  Show[c[f][0,2Pi]]  to view the curve statically.  Then execute r[f][0,2Pi] to produce the sequence of 15 graphs that can be animated to rotate the curve.  From the animation, determine in how many places the curve intersects itself.
  83. ;[s]
  84. 5:0,0;44,1;65,2;108,3;121,4;279,-1;
  85. 5:1,11,8,Times,0,12,0,0,0;1,10,8,Courier,1,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,1,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  86. :[font = text; inactive; preserveAspect; ]
  87. 1.  { Sin[t], Cos[3t], Sin[3t] }
  88. :[font = text; inactive; preserveAspect; ]
  89. 2.  { 2Cos[t]+4Cos[2t], 2Sin[t]-4Sin[2t], 4Sin[t] }
  90. :[font = text; inactive; preserveAspect; ]
  91. 3.  { 4Cos[t]+Cos[7t], 4Sin[t]+Sin[7t], 5Cos[t] }
  92. :[font = text; inactive; preserveAspect; endGroup; endGroup; ]
  93. 4.  {15Cos[t]+10Cos[2t],15Sin[t]-10Sin[2t],4Sin[3t]}
  94. :[font = section; inactive; Cclosed; noPageBreak; preserveAspect; startGroup; ]
  95. The Velocity Vector
  96. :[font = text; inactive; Cclosed; preserveAspect; startGroup; ]
  97. These definitions similar to those used in Lab 6:
  98. :[font = input; preserveAspect; ]
  99. pt[f_][t_] := Graphics3D[ { PointSize[0.02], Point[f[t]] } ];
  100. v[f_][t_] := Graphics3D[ { Line[{f[t],f[t]+f'[t]}]},
  101.             PointSize[.02], Point[f[t]+f'[t]] ]
  102. tr[f_][a_,b_] := { c[f][a,b], Table[ p[f][t], {t,a,b} ],
  103.                              Table[ v[f][t], {t,a,b} ] };
  104. :[font = text; inactive; preserveAspect; endGroup; ]
  105. Here, pt[f_][t_] is the point at f(t), v[f_][t_] is the velocity vector at f(t), and tr[f_][a_,b_] is the trajectory of f for t in the range [a,b].  The large points mark the locations of the particle at integral time values (t=0, t=1, t=2, etc.), just as in Lab 6.
  106. ;[s]
  107. 29:0,0;5,1;17,2;33,3;34,4;35,5;36,6;38,7;49,8;75,9;76,10;77,11;78,12;84,13;99,14;120,15;121,16;126,17;127,18;142,19;143,20;144,21;145,22;226,23;227,24;231,25;232,26;236,27;237,28;265,-1;
  108. 29:1,11,8,Times,0,12,0,0,0;1,10,8,Courier,1,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,1,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,1,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  109. :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ]
  110. Example
  111. :[font = text; inactive; Cclosed; preserveAspect; startGroup; ]
  112. Here's the trajectory of the helix with velocity vectors attached:
  113. :[font = input; preserveAspect; endGroup; endGroup; ]
  114. f[t_] := { 3Cos[t], 3Sin[t], t };
  115. Show[ tr[f][0,6Pi] ];
  116. :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ]
  117. Exercises
  118. :[font = text; inactive; preserveAspect; ]
  119. Examine the velocity vectors of the following curves.
  120. :[font = text; inactive; preserveAspect; ]
  121. 1.  { Sin[t], Cos[3t], Sin[3t] }
  122. :[font = text; inactive; preserveAspect; ]
  123. 2.  { 2Cos[t]+4Cos[2t], 2Sin[t]-4Sin[2t], Cos[t] }
  124. :[font = text; inactive; preserveAspect; ]
  125. 3.  { 4Cos[t]+Cos[7t], 4Sin[t]+Sin[7t], 5Cos[t] }
  126. :[font = text; inactive; preserveAspect; endGroup; endGroup; ]
  127. 4.  { Cos[3t]+4Cos[t], Sin[3t]+4Sin[t], Cos[t] }
  128. :[font = section; inactive; Cclosed; pageBreak; preserveAspect; startGroup; ]
  129. The Acceleration Vector
  130. :[font = text; inactive; Cclosed; preserveAspect; startGroup; ]
  131. The acceleration vector is the second derivative of the function vector.  The following definitions allow the trajectory to be graphed with both velocity vectors and accelerations vectors:
  132. :[font = input; preserveAspect; ]
  133. Clear[a,f,tr];
  134. a[f_][t_] := Graphics3D[ { Line[{f[t],f[t]+f''[t]}]},
  135.             PointSize[.02],Point[f[t]+f''[t]] ];
  136. tr[f_][aa_,b_] := { c[f][aa,b], Table[ p[f][t], {t,aa,b} ],
  137.                                Table[ v[f][t], {t,aa,b} ],
  138.                                Table[ a[f][t], {t,aa,b} ] };
  139.  
  140. :[font = text; inactive; preserveAspect; endGroup; ]
  141. (To avoid conflict, we had to use the new symbol aa for the lower bound on t.)
  142. :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ]
  143. Example
  144. :[font = text; inactive; Cclosed; preserveAspect; startGroup; ]
  145. Here's our helix with velocity vectors attached:
  146. :[font = input; preserveAspect; ]
  147. f[t_] := { 3Cos[t], 3Sin[t], t };
  148. Show[ tr[f][0,6Pi] ];
  149. :[font = text; inactive; preserveAspect; endGroup; endGroup; ]
  150. Notice that, for the circular helix, all the acceleration vectors point inward toward the axis.
  151. :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ]
  152. Exercises
  153. :[font = text; inactive; preserveAspect; ]
  154. Examine the velocity and acceleration vectors of the following curves.
  155. :[font = text; inactive; preserveAspect; ]
  156. 1.  { Sin[t], Cos[3t], Sin[3t] }
  157. :[font = text; inactive; preserveAspect; ]
  158. 2.  { 2Cos[t]+4Cos[2t], 2Sin[t]-4Sin[2t], Cos[t] }
  159. :[font = text; inactive; preserveAspect; ]
  160. 3.  { 4Cos[t]+Cos[7t], 4Sin[t]+Sin[7t], 5Cos[t] }
  161. :[font = text; inactive; preserveAspect; endGroup; endGroup; ]
  162. 4.  { Cos[3t]+4Cos[t], Sin[3t]+4Sin[t], Cos[t] }
  163. :[font = section; inactive; Cclosed; preserveAspect; startGroup; ]
  164. Speed
  165. :[font = text; inactive; Cclosed; preserveAspect; startGroup; ]
  166. The speed of a particle is the (scalar) magnitude of its velocity vector:
  167. :[font = input; preserveAspect; ]
  168. Norm[v_] := Sqrt[v.v];
  169. s[f_][t_] := Norm[f'[t]];
  170. :[font = text; inactive; preserveAspect; endGroup; ]
  171. Here, we have used the numerical value because the algebraic expression in nearly every case is intractable.
  172. :[font = subsection; inactive; Cclosed; pageBreak; preserveAspect; startGroup; ]
  173. Example
  174. :[font = text; inactive; Cclosed; preserveAspect; startGroup; ]
  175. For our helix:
  176. :[font = input; preserveAspect; endGroup; ]
  177. f[t_] := { 3Cos[t], 3Sin[t], t };
  178. s[f][2]
  179. :[font = text; inactive; Cclosed; preserveAspect; startGroup; ]
  180. The numerical value is:
  181. :[font = input; preserveAspect; ]
  182. N[s[f][2]]
  183. :[font = text; inactive; preserveAspect; endGroup; ]
  184. This is the speed at the time t=2 .
  185. ;[s]
  186. 3:0,0;30,1;31,2;36,-1;
  187. 3:1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  188. :[font = text; inactive; Cclosed; preserveAspect; startGroup; ]
  189. In fact, for the helix, the speed is constant:
  190. :[font = input; preserveAspect; endGroup; endGroup; ]
  191. Table[ N[s[f][t]], {t,0,Pi,Pi/8} ]
  192. :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ]
  193. Exercises
  194. :[font = text; inactive; preserveAspect; ]
  195. Use the Table[ N[s[f][t]], {t,0,Pi,Pi/8} ] command to find the speed for each of the following at the 9 times listed.
  196. ;[s]
  197. 3:0,0;7,1;43,2;118,-1;
  198. 3:1,11,8,Times,0,12,0,0,0;1,10,8,Courier,1,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  199. :[font = text; inactive; preserveAspect; ]
  200. 1.  { Sin[t], Cos[3t], Sin[3t] }
  201. :[font = text; inactive; preserveAspect; ]
  202. 2.  { 2Cos[t]+4Cos[2t], 2Sin[t]-4Sin[2t], Cos[t] }
  203. :[font = text; inactive; preserveAspect; ]
  204. 3.  { 4Cos[t]+Cos[7t], 4Sin[t]+Sin[7t], 5Cos[t] }
  205. :[font = text; inactive; preserveAspect; endGroup; endGroup; ]
  206. 4.  { Cos[3t]+4Cos[t], Sin[3t]+4Sin[t], Cos[t] }
  207. :[font = section; inactive; Cclosed; pageBreak; preserveAspect; startGroup; ]
  208. Arc Length
  209. :[font = text; inactive; Cclosed; preserveAspect; startGroup; ]
  210. The length of a curve is the integral of its speed:
  211. :[font = input; preserveAspect; endGroup; ]
  212. len[f_][aa_,b_] := Integrate[ s[f][t], {t,aa,b} ]
  213. :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ]
  214. Example
  215. :[font = text; inactive; Cclosed; preserveAspect; startGroup; ]
  216. For our helix:
  217. :[font = input; preserveAspect; endGroup; ]
  218. f[t_] := { 3Cos[t], 3Sin[t], t };
  219. len[f][0,2Pi]
  220. :[font = text; inactive; Cclosed; preserveAspect; startGroup; ]
  221. The numerical value is:
  222. :[font = input; preserveAspect; endGroup; endGroup; ]
  223. N[%]
  224. :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ]
  225. Exercises
  226. :[font = text; inactive; preserveAspect; ]
  227. Find the (numerical) length of each curve from t=0 to t=2Pi :
  228. ;[s]
  229. 5:0,0;47,1;48,2;54,3;55,4;62,-1;
  230. 5:1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  231. :[font = text; inactive; preserveAspect; ]
  232. 1.  { Sin[t], Cos[3t], Sin[3t] }
  233. :[font = text; inactive; preserveAspect; ]
  234. 2.  { 2Cos[t]+4Cos[2t], 2Sin[t]-4Sin[2t], Cos[t] }
  235. :[font = text; inactive; preserveAspect; ]
  236. 3.  { 4Cos[t]+Cos[7t], 4Sin[t]+Sin[7t], 5Cos[t] }
  237. :[font = text; inactive; preserveAspect; ]
  238. 4.  { Cos[3t]+4Cos[t], Sin[3t]+4Sin[t], Cos[t] }
  239. :[font = text; inactive; preserveAspect; endGroup; endGroup; endGroup; ]
  240. 5.  {15Cos[t]+10Cos[2t],15Sin[t]-10Sin[2t],4Sin[3t]}
  241. ^*)